diff -ur -U5 ruby-2.5.1.orig/tool/rbinstall.rb ruby-2.5.1/tool/rbinstall.rb
--- ruby-2.5.1.orig/tool/rbinstall.rb	2017-10-30 05:45:20.000000000 +0000
+++ ruby-2.5.1/tool/rbinstall.rb	2018-07-05 19:06:58.963282600 +0100
@@ -442,11 +442,11 @@
 PROLOG_SCRIPT["exe"] = "#!#{bindir}/#{ruby_install_name}"
 PROLOG_SCRIPT["cmd"] = <<EOS
 :""||{ ""=> %q<-*- ruby -*-
 @"%~dp0#{ruby_install_name}" -x "%~f0" %*
 @exit /b %ERRORLEVEL%
-};{#\n#{prolog_script.gsub(/(?=\n)/, ' #')}>,\n}
+};{ #\n#{prolog_script.gsub(/(?=\n)/, ' #')}>,\n}
 EOS
 PROLOG_SCRIPT.default = (load_relative || /\s/ =~ bindir) ?
                           <<EOS : PROLOG_SCRIPT["exe"]
 #!/bin/sh
 # -*- ruby -*-

